<template>
	<div class="section-ten" :title="page_title">
		<h2 class="common_title" @click="edit('title_1')">{{component.title_1}}<i></i></h2>
		<div class="reward-big-box width-visual">
			<div class="reward-box" id="rewardBox">
				<div id="show" rel="autoPlay" style="width: 1064px;">
					<div class="img" style="width: 1064px;">
						<div class="box clearfix" style="">
							<div class="con" style="width: 266px;" v-for="(item, index) in component.elements" :key="index">
								<div class="img-content"><img :src="item.img" alt="">
									<p>{{item.title_1}}<br>{{item.title_2}}</p>
								</div>
							</div>
						</div>
					</div>
					<div class="arrowBtn"><s class="prev"><img src=""></s><s class="next"><img src=""></s>
					</div>
				</div>
			</div>
		</div>
		<el-dialog title="编辑文本" :visible.sync="dialogVisible" width="20%" custom-class="mydialog">
			<el-input type="textarea" v-model="rawhtml" size="small" width="150px;"></el-input>
			<span slot="footer" class="dialog-footer">
				<el-button @click="dialogVisible = false">取 消</el-button>
				<el-button type="primary" @click="editOK">确 定</el-button>
			</span>
		</el-dialog>
	</div>
</template>

<script>
	import { Mixins } from "@/common/mixins";
	export default {
		mixins: [Mixins],
		props: ["pcomponent"],
		data() {
			return {
				component: this.pcomponent,
				dialogVisible: false,
				rawhtml: "",
				currentProp: "",
				page_title: this.$vnode.key,
			};
		},
		created() {
			console.log(this.$vnode.key + "子组件接收父组件值：", this.component);
		},
		methods: {},
	};
</script>
<style lang="less">
.mydialog {
	opacity: 70%;
}
</style>